<div class="tree">
    <div class="menu-item" 
         [style.padding-left.em]="_data.level*1.5" 
         [class.child]="!_data.children||_data.children.length===0" 
         [class.father]="_data.children&&_data.children.length>0">
      <!--无子节点的节点没有图标,展开与折叠子节点-->
      <i class="menu-icon" 
         *ngIf="_data.children&&_data.children.length>0" 
         (click)="_data.isOpen=!_data.isOpen" 
         [class.expland-icon]="_data.isOpen"></i>
      <span>
        <a href="javascript:void(0);" (click)="choose(_data)">{{_data.name}}</a>
      </span>
    </div>
    <ng-container *ngIf="_data.children&&_data.children.length>0"><!--是否存在子节点-->
        <div *ngIf="_data.isOpen"><!--子节点是否展开-->
            <ng-container  *ngFor="let child of _data.children"><!--遍历子节点-->
              <app-tree [data]="child" (select)="choose($event)"></app-tree>
            </ng-container>
        </div>
    </ng-container>
</div>